package com.qh.yyxt.service;

import com.qh.yyxt.entity.BorrowThing;
import com.qh.yyxt.entity.Flag;
import com.qh.yyxt.pojo.BorrowThingDTO;
import com.qh.yyxt.pojo.BorrowThingInfoDTO;
import com.qh.yyxt.pojo.TableDTO;

import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface BorrowThingService
{
    //借东西
    public int addBorrowThing(Flag flag,int tid[],int sid[],int nums[]);
    //借东西新的逻辑。要审批
    public int newAddBorrowThing(Flag flag,int tid[],int sid[],int nums[]);
    //修改一些信息
    public int updateInfo(Integer id,Integer acnum, Integer badnum,String state);
    //只修改物品状态
    public int updateState(Integer id,String state);
    //根据fid修改物品状态
    public int updateStateByFid(Integer fId,String state);
    //根据state查询
    public BorrowThingInfoDTO findByState(Integer fId,String state);
    //根据badnum查询用来判断损坏的物品
    public Integer findByBadBum(Integer fId);
    //根据fid找到详情
    public BorrowThingInfoDTO findByFid(Integer fId);
    public BorrowThing findById(Integer id);
    public int updateThingANdSizeNum(Map<Integer,Integer> map,Integer fid);
    public Boolean judgeAllThingSize(Integer fId);
    public List<BorrowThing>findBorrowThingByFid(Integer fId);
    public Integer findBySid(Integer sid);
    public int deleteBySid(Integer sid);
    public int deleteByTid(Integer tid);
    public void export(BorrowThingInfoDTO borrowThingInfoDTO, HttpServletResponse response);
}
